//
//  FoncusOnStoreViewModel.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/4.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "FoncusOnStoreViewModel.h"
#import "SearchStoreTableViewCell.h"

@interface FoncusOnStoreViewModel ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation FoncusOnStoreViewModel

-(instancetype)initWithViewToViewModel:(UITableView *)tableView theSuperView:(UIView *)superView{
    if (self = [super initWithViewToViewModel:tableView theSuperView:superView]) {
        tableView.height = tableView.height - kHeightProportion_In_iPhoneTriploid(44);
        tableView.mj_footer.hidden = YES;
        tableView.mj_header.hidden = YES;
        tableView.delegate = self;
        tableView.dataSource = self;
        tableView.rowHeight = kHeightProportion_In_iPhoneTriploid(126);
        [superView addSubview:tableView];
    }
    return self;
}

#pragma mark --- UITableViewDelegate,UITableViewDataSource
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    SearchStoreTableViewCell * cell = [SearchStoreTableViewCell cellWithTableView:tableView];
    cell.Block_PushStore = ^{
        if (self.delegate && [self.delegate respondsToSelector:@selector(pushStroreInformation)]) {
            [self.delegate pushStroreInformation];
        }
    };
    return cell;
}

@end
